package com.jiai.cloud.feign;


import com.jiai.cloud.entity.TOrder;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
<<<<<<< Updated upstream
import org.springframework.web.bind.annotation.RequestMethod;

=======
import org.springframework.web.bind.annotation.ResponseBody;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
>>>>>>> Stashed changes

@FeignClient("authentication")
public interface OrderAPI {

    //增
    @RequestMapping(value="/api/v1/order/addOrder", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object addOrder(@RequestBody TOrder tOrder);

    //删
    @RequestMapping(value="/api/v1/order/del/{orderNo}", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object delete(@PathVariable("orderNo") String orderNo);

    //查
    @RequestMapping(value="/api/v1/order/findByAll", produces = {"application/json;charset=UTF-8"}, method = POST)
    Object findByAll();

<<<<<<< Updated upstream
    @RequestMapping("/api/v1/order/del/{orderNo}")
    Object deleteId(@PathVariable("orderNo") String orderNo);

    @RequestMapping("/api/v1/order/findByid/{orderNo}")
    Object selectById(@PathVariable("orderNo") String orderNo);

    @RequestMapping("/api/v1/order/edit")
    Object insertOrUpdate(@RequestBody TOrder tOrder);

    @RequestMapping(value = "/api/v1/order/findByAll/{page}",method = RequestMethod.GET)
    Object selectPage(@PathVariable("page") Integer page);
=======
    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/order/edit", produces = {"application/json;charset=UTF-8"}, method = POST)
    @ResponseBody
    Object edit(TOrder tOrder);
>>>>>>> Stashed changes
}